#! /usr/bin/env perl
# author: maxiao
# date: 2023-03-07 12:13
# description: 测试堆栈的元素压出功能

use v5.10;
use utf8;

# 初始化
@array = 1..10;
while (defined(@array[-1])) {
    $item = pop(@array);
    print "当前压出的元素为：$item\n";
}

